import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Login from '../views/login/Login.vue'

Vue.use(VueRouter)

  const routes = [
  {
    path: '/',
    name: 'Login',
    component: Login
  },
  {
    path: '/home',
    name: 'Home',
    component: Home,
    children: [
      {
        path: '/sys/server',
        name: 'sysServer',
        component: () => import('../views/sys/server.vue')
      },
      {
        path: '/sys/onlineUsers',
        name: 'sysOnlineUsers',
        component: () => import('../views/sys/onlineUsers.vue')
      },
      {
        path: '/sys/info',
        name: 'sysInfo',
        component: () => import('../views/sys/info.vue')
      },
      {
        path: '/save/local',
        name: 'saveLocal',
        component: () => import('../views/save/local.vue')
      },
      {
        path: '/save/net',
        name: 'saveNet',
        component: () => import('../views/save/net.vue')
      },
      {
        path: '/save/raid',
        name: 'saveRaid',
        component: () => import('../views/save/raid.vue')
      },
      {
        path: '/direct/device',
        name: 'saveRaid',
        component: () => import('../views/direct/device.vue')
      },
      {
        path: '/direct/resave',
        name: 'saveRaid',
        component: () => import('../views/direct/resave.vue')
      },
      {
        path: '/direct/canvas',
        name: 'saveRaid',
        component: () => import('../views/direct/canvas.vue')
      },
      {
        path: '/direct/location',
        name: 'location',
        component: () => import('../views/direct/location.vue')
      },
      {
        path: '/ai/analysis',
        name: 'aiAnalysis',
        component: () => import('../views/ai/analysis.vue')
      },
      {
        path: '/ai/car',
        name: 'aiCar',
        component: () => import('../views/ai/car.vue')
      },
      {
        path: '/ai/face',
        name: 'aiFace',
        component: () => import('../views/ai/face.vue')
      },
      {
        path: '/ai/body',
        name: 'aiBody',
        component: () => import('../views/ai/body.vue')
      },
      {
        path: '/backlook/video',
        name: 'backlookVideo',
        component: () => import('../views/backlook/video.vue')
      },
      {
        path: '/backlook/back',
        name: 'backlookBack',
        component: () => import('../views/backlook/back.vue')
      },
      {
        path: '/cluster/setup',
        name: 'clusterSetup',
        component: () => import('../views/cluster/setup.vue')
      },
      {
        path: '/cluster/videotape',
        name: 'clusterVideotape',
        component: () => import('../views/cluster/videotape.vue')
      },
      {
        path: '/cluster/log',
        name: 'clusterLog',
        component: () => import('../views/cluster/log.vue')
      },
      {
        path: '/log/log',
        name: 'logLog',
        component: () => import('../views/log/log.vue')
      },
      {
        path: '/ipsan/pond',
        name: 'ipsanPond',
        component: () => import('../views/ipsan/pond.vue')
      },
      {
        path: '/ipsan/users',
        name: 'ipsanusers',
        component: () => import('../views/ipsan/users.vue')
      },
      {
        path: '/ipsan/folder',
        name: 'ipsanfolder',
        component: () => import('../views/ipsan/folder.vue')
      },
      {
        path: '/ipsan/ftp',
        name: 'ipsanftp',
        component: () => import('../views/ipsan/ftp.vue')
      },
      {
        path: '/ipsan/share',
        name: 'ipsanshare',
        component: () => import('../views/ipsan/share.vue')
      },
      {
        path: '/direct/lock',
        name: 'directLock',
        component: () => import('../views/direct/lock.vue')
      },
      {
        path: '/direct/ctrl',
        name: 'directCtrl',
        component: () => import('../views/direct/ctrl.vue')
      },
      {
        path: '/direct/setup',
        name: 'directetup',
        component: () => import('../views/direct/setup.vue')
      },
      {
        path: '/configure/netcard',
        name: 'configureNetcard',
        component: () => import('../views/configure/netcard.vue')
      },
      {
        path: '/configure/setup',
        name: 'configuresetup',
        component: () => import('../views/configure/setup.vue')
      },
      {
        path: '/configure/users',
        name: 'configure',
        component: () => import('../views/configure/users.vue')
      },
      {
        path: '/configure/events',
        name: 'configureevents',
        component: () => import('../views/configure/events.vue')
      },
      {
        path: '/configure/net',
        name: 'configurenet',
        component: () => import('../views/configure/net.vue')
      },
      {
        path: '/configure/hold',
        name: 'configurehold',
        component: () => import('../views/configure/hold.vue')
      },
      {
        path: '/configure/safe',
        name: 'configuresafe',
        component: () => import('../views/configure/safe.vue')
      }
    ]
  }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
